<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>test - ArduinoUnit Library - ArduinoUnit Documentation</title>
<link href="styles/styles.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<h1><a href="index.html"><img border="0" src="images/arduinounit.png"/></a> <span class="success">Arduino</span><span class="failure">Unit</span> Documentation</h1>

<a href="reference.html">ArduinoUnit Library Reference</a>
<h2>test()</h2>
<h3>Description</h3>
<p>
Defines a test function in the most recently declared test suite.
</p>
<h3>Syntax</h3>
<code>
test(&lt;name&gt;)
</code>
<h3>Parameters</h3>
<p>
<code>&lt;name&gt;</code>: the name of the test function
</p>
<h3>Example</h3>
<code>
#include &lt;ArduinoUnit.h&gt;

TestSuite suite;

void setup() {
}

test(addition) {
  assertEquals(2, 1 + 1);
}

void loop() {
  suite.run();
}
</code>

</body>
</html>